// components/amount/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    propsData : Object
  },

  /**
   * 组件的初始数据
   */
  data: {
    signInList : []
  },
  attached: function () {
    console.log(1111,this.data.propsData)
    let tempList = []
    for(let i = 1 ; i <= 7 ; i++) {
      tempList.push({ id : '0' + i , active : false})
    }
    let signInNum = this.data.propsData.dayNum || 0
    for(let i = 1 ; i <= signInNum ; i++) {
      tempList[i-1].active = true
    }
    this.setData({
      signInList : tempList
    })

  },
  /**
   * 组件的方法列表
   */
  methods: {
 
  }
})
